#version 450

#extension GL_GOOGLE_include_directive : enable

layout (location = 0) in vec3 InPos;

layout (push_constant) uniform SDirectionalLightVertexPushConstant
{
  mat4 PV; // light projection matrix *light view matrix  

} PushConstants;


struct SModelBuffer
{
    mat4 Model;
};

#include "../CppMacros.h"

layout (set=0, binding = 0) uniform ModelBufferBatch
{
    SModelBuffer Models[MESH_BATCH_SIZE];
} ModelBuffer;

void main()
{
	gl_Position =  PushConstants.PV* ModelBuffer.Models[gl_InstanceIndex].Model  * vec4(InPos, 1.0);
}